﻿<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Import Namespace="Microsoft.SharePoint" %>

<%@ Register TagPrefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="wssawc" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>
<%@ Register TagPrefix="wssuc" TagName="ToolBar" src="~/_controltemplates/ToolBar.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormSection" src="~/_controltemplates/InputFormSection.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormControl" src="~/_controltemplates/InputFormControl.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="ButtonSection" src="~/_controltemplates/ButtonSection.ascx" %>

<%@ Page Language="C#" 
	AutoEventWireup="true" 
	CodeBehind="EditDataConnection.aspx.cs"
	Inherits="SpugPt.DataConnManager.EditDataConnection" 
	MasterPageFile="~/_layouts/dialog.master" %>



<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderDialogBodyMainSection" runat="server">
	<asp:Panel ID="inputControls" runat="server">
	<script type="text/javascript">


	   
		function ValidateDelete() {

		    return confirm('Are you sure you want to delete this key?\n');
		}
	
	</script> 
		<table border="0" cellspacing="0" cellpadding="0" width="100%">
			<tr>
				<td width="50%">
				   
					<!-- ************************************** -->
					<!-- **************************************
					 display the web application selector
					 using the inputformsecton and
					 webapplicationselector controls -->
                    <wssuc:inputformsection runat="server" title="Name" description="Enter key name">
					<Template_InputFormControls>
					<tr>
						<td>
					  
							<Template_Control>
								<wssawc:InputFormTextBox Title="Name" class="ms-input" ID="txtName" Columns="55" Runat="server" MaxLength=255 EnableViewState="true" />
								<wssawc:InputFormRequiredFieldValidator
									ID="InputFormRequiredFieldValidator1"
									ControlToValidate="txtName"
									ErrorMessage="This value cannot be left empty!"
									Runat="server"/>
							</Template_Control>
						</wssuc:InputFormControl>
						</td>
					</tr>
					</Template_InputFormControls>
				</wssuc:inputformsection>
					<!-- *************************************** -->
					<!-- ***************************************
					display an input form section -->
					<wssuc:inputformsection runat="server" title="Value" description="Enter key value">
					<Template_InputFormControls>
					   
							<Template_Control>
								<wssawc:InputFormTextBox Title="Value" Height="100px" class="ms-input" ID="txtValue" Columns="55" Runat="server" MaxLength=255 TextMode="MultiLine" EnableViewState="true" />
								<wssawc:InputFormRequiredFieldValidator
									ID="ReqValtxtConfigurationSiteURL"
									ControlToValidate="txtValue"
									ErrorMessage="This value cannot be left empty!"
									Runat="server"/>
							</Template_Control>
						</wssuc:InputFormControl>
					</Template_InputFormControls>
                    
				</wssuc:inputformsection>
				</td>
			</tr>
            <tr>
            <td colspan="2" width="100%" align="center">
                <br />
                <asp:Label CssClass="ms-error" runat="server" ID="lblErrorMessage"/>          
            </td>
            </tr>
            <tr>
             <%--<td colspan="2" width="100%" align="center">
                <br />
                <a class="ms-vb2" > Too access this key within code use:</a>
                <a class="ms-vb2" >webApp.Properties["<%=Prefix%>NAME_OF_THE_KEY"].ToString()</a>
            </td>--%>
            </tr>
		</table>
	</asp:Panel>
    
	<!-- Literal Control to display messages -->
	<div style="font-size: 12pt; color: red; font-weight: bold;">
		<asp:Literal ID="litMessages" runat="server" />
	</div>
</asp:Content>
<asp:Content ContentPlaceHolderID="PlaceHolderAdditionalPreButton" runat="server">
<td class="ms-dialogButtonCell" style="padding-right:100px">
    
	<asp:Button  runat="server" class="ms-ButtonHeightWidth" Text="Delete" ID="btDelete" OnClientClick="return ValidateDelete()" />
</td>
    
</asp:Content>
<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderDialogHeaderPageTitle" runat="server">
	SPugPt Data Connection Manager
</asp:Content>

<asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderDialogDescription" runat="server">
	<asp:Label Text="Create\Edit Keys" id="lblDescription" runat="server"></asp:Label>
</asp:Content>



